<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>numIpt示例</title>
    <style>
        .u-numipt .operate{
            float: left;
            width: 16px;
            height: 16px;
            line-height: 16px;
            padding: 5px;
            text-align: center;
            border: 1px solid #ccc;
            color: #000;
            background-color: #fff;
            text-decoration: none;
        }
        .u-numipt .operate:hover{
            background-color: #ccc;
            text-decoration: none;
        }
        .u-numipt input{
            float: left;
            width: 40px;
            height: 16px;
            line-height: 16px;
            padding: 5px;
            text-align: center;
            border: 1px solid #ccc;
            border-left: 0;
            border-right: 0;
            outline: 0;
            background-color: #fff;
        }
    </style>
</head>
<body>
    <div class="u-numipt j-num">
        <a href="javascript:;" class="operate j-del">-</a>
        <input type="text" class="j-ipt" value="1">
        <a href="javascript:;" class="operate j-add">+</a>
    </div>
    <script src="http://libs.baidu.com/jquery/1.10.2/jquery.js"></script>
    <script src="jquery.numIpt.js"></script>
    <script>
        $(".j-num").numIpt({
            $input: ".j-ipt",
            $add  : ".j-add",
            $del  : ".j-del"
        });
    </script>
</body>
</html>
